package com.young.core.manager;

import com.young.common.query.Pagination;
import com.young.common.query.Query;
import com.young.core.domain.TraceDO;
import org.springframework.transaction.annotation.Transactional;

import java.util.Collection;
import java.util.Date;

public interface TraceManager {

    Pagination<TraceDO> query(Query query);

    @Transactional
    void insert(TraceDO trace);

    TraceDO get(String traceId);

    @Transactional
    void append(String traceId, TraceDO.NodeTrace nodeTrace);

    @Transactional
    int deleteExpired(Date time, Collection<String> excludes);

}
